/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainFrame.java
 *
 * Created on Mar 3, 2009, 1:14:05 PM
 */
package org.sunspotworld.demo;

import java.awt.*;
import java.awt.Color;
import java.awt.Graphics;
import java.sql.*;
import java.util.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.*;
import java.lang.Double;

/**
 *
 * @author shahsant
 */
public class MainFrame extends javax.swing.JFrame {

    public static MainFrame telemetryFrame;
    private GraphView graphView;
    private GraphView graphView2;
    // for multiple threads
    private static AccelerometerListener accListener;
   // private ArrayList<AccelerometerListener> ListenerL;

    private JPanel axisView;
    private boolean fixedData = false;
    private boolean clearedData = true;
    private boolean sendData = false;
    private ResultSet rs = null;
    public DefaultTableModel model = null;
    public GCanvas canvas;
    public Graphics g;
    public Graphics2D g2D;
    public Container container;
    private JScrollPane jScrollPaneSplitViewGraph;
    public static boolean UserVerfied = false;

    public MainFrame(JPanel jPanel1) {
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {

        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
        //UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");

        //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
        } catch (UnsupportedLookAndFeelException ex) {
            System.out.println("Unsupported Look and Feel Excep " + ex.getMessage());
            ex.printStackTrace();

        } catch (IllegalAccessException ex) {
            System.out.println("Illegal Access Exception " + ex.getMessage());
            ex.printStackTrace();
        } catch (ClassNotFoundException ex) {
            System.out.println("Class not found " + ex.getMessage());
            ex.printStackTrace();
        } catch (InstantiationException ex) {
            System.out.println("Instantiation Exception " + ex.getMessage());
            ex.printStackTrace();
        }
        MainFrame.frameGraph(new GraphView());

    //        java.awt.EventQueue.invokeLater(new Runnable() {
//            public void run() {
//                new MainFrame().setVisible(true);
//            }
//        });
    }

    /**
     * Connect this window with a graph display and a file.
     */
    private static MainFrame frameGraph(GraphView graphView) {
        telemetryFrame = new MainFrame();
        telemetryFrame.setTitle("Rehab Application");
        telemetryFrame.setGraphView(graphView);
        telemetryFrame.setSplitGraph();
        telemetryFrame.setVisible(true);
        //telemetryFrame.setOptionsAccess();

        // String str = telemetryFrame.getTitle();


        // uncomment for multiple windowns
//        if (!checkTitle(str)) {
//            int i = 1;
//            while (true) {
//                if (checkTitle(str + "-" + i)) {
//                    telemetryFrame.setTitle(str + "-" + i);
//                    break;
//                } else {
//                    i++;
//                }
//            }
//        }
//        windows.add(telemetryFrame);
//        numWindows++;
        return telemetryFrame;
    }

    private void setSplitGraph() {

        graphView2 = new GraphView();
        setGraphView2(graphView2);
    }

    /**
     * Set the GraphView to display accelerometer values for this window.
     */
    private void setGraphView(GraphView gv) {
        graphView = gv;
        graphViewScrollPane.setViewportView(gv);
        gv.setViewport(graphViewScrollPane.getViewport());
        // gv.setMaxGLabel(maxGLabel);
        // Integer fieldWidth = (Integer)filterWidthField.getValue();
        //graphView.setFilterWidth(fieldWidth.intValue() - 1);
        final GraphView gview = gv;
        axisView = new JPanel() {

            public Dimension getPreferredSize() {
                return new Dimension(GraphView.AXIS_WIDTH, gview.getPreferredSize().height);
            }

            public void paintComponent(Graphics g) {
                super.paintComponent(g);
                g.setColor(Color.BLACK);
                gview.paintYaxis(g);
            }
        };
        axisView.setBackground(Color.WHITE);
        y_axisPanel.add(axisView);
        gv.setAxisPanel(axisView);
//        if (fixedData) {
//            if (graphView.is2G()) {
//                twoGRadioButton.setSelected(true);
//            } else {
//                sixGRadioButton.setSelected(true);
//            }
//            twoGRadioButton.setEnabled(false);
//            sixGRadioButton.setEnabled(false);
//        }
    }

    /**
     * For split view - over loading method Graph View
     *
     */
    private void setGraphView2(GraphView gv) {
        graphView2 = gv;

        canvas = new GCanvas();
        canvas.setOpaque(false);
        canvas.setSize(jLayeredPane1.getSize());
        jScrollPaneSplitViewGraph = new JScrollPane();
        jScrollPaneSplitViewGraph.setOpaque(true);
        jScrollPaneSplitViewGraph.setSize(jLayeredPane1.getSize());
        jLayeredPane1.setLayout(new OverlayLayout(jLayeredPane1));
        jLayeredPane1.add(jScrollPaneSplitViewGraph, new Integer(-1));
        jScrollPaneSplitViewGraph.setViewportView(gv);
        //      jScrollPaneSplitViewGraph.getViewport().setOpaque(true);
        jLayeredPane1.add(canvas, new Integer(0));

        jScrollPaneSplitViewGraph.addMouseListener(new java.awt.event.MouseAdapter() {

            public void mousePressed(java.awt.event.MouseEvent evt) {
                canvesPanelMousePressed(evt);
            }

            public void mouseReleased(java.awt.event.MouseEvent evt) {
                canvesPane1MouseReleased(evt);
            }
        });

        jScrollPaneSplitViewGraph.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {

            public void mouseDragged(java.awt.event.MouseEvent evt) {
            }
        });

        final GraphView gview = gv;
        axisView = new JPanel() {

            public Dimension getPreferredSize() {
                return new Dimension(GraphView.AXIS_WIDTH, gview.getPreferredSize().height);
            }

            public void paintComponent(Graphics g) {
                super.paintComponent(g);
                g.setColor(Color.BLACK);
                gview.paintYaxis(g);
            }
        };
        axisView.setBackground(Color.WHITE);
        jPanelSplitViewYaxis.add(axisView);
        gv.setAxisPanel(axisView);
//        if (fixedData) {
//            if (graphView.is2G()) {
//                twoGRadioButton.setSelected(true);
//            } else {
//                sixGRadioButton.setSelected(true);
//            }
//            twoGRadioButton.setEnabled(false);
//            sixGRadioButton.setEnabled(false);
//        }
    }

    public static void setOptionsAccess() {

        telemetryFrame.jMenuData.setEnabled(UserVerfied);
        telemetryFrame.jMenuSensor.setEnabled(UserVerfied);
        telemetryFrame.jMenuItemNewRecord.setEnabled(UserVerfied);
        telemetryFrame.jButtonStartLogging.setEnabled(UserVerfied);
        telemetryFrame.jButtonRetrieve.setEnabled(UserVerfied);
        telemetryFrame.jButtonSaveSession.setEnabled(UserVerfied);
        telemetryFrame.jButtonDiscardSession.setEnabled(UserVerfied);
       // telemetryFrame.jMenuItemChangeUser.setText(UserVerfied ? "Switch User" : "Log On");

    }

    /** Creates new form MainFrame */
    public MainFrame() {
        init();
    }

    /**
     * Initialize the new TelemetryFrame
     */
    private void init() {
        
        if (accListener == null) {
            accListener = new AccelerometerListener();         // only need one
            accListener.start();
            //aboutIcon = new ImageIcon(getClass().getResource("/org/sunspotworld/demo/racecar.gif"));
        }
        initComponents();
//        setupAcceleratorKeys();
    }

    /**
     * Display the current connection status to a remote SPOT.
     * Called by the AccelerometerListener whenever the radio connection status changes.
     *
     * @param conn true if now connected to a remote SPOT
     * @param msg the String message to display, includes the
     */
    public void setConnectionStatus(boolean conn, String msg) {
        jLabelConnection.setText(msg);
//        blinkButton.setEnabled(conn);
//        pingButton.setEnabled(conn);
//        reconnButton.setEnabled(conn);
//        if (!fixedData) {
//            if (listener.is2GScale()) {
//                twoGRadioButton.setSelected(true);
//            } else {
//                sixGRadioButton.setSelected(true);
//            }
//            twoGRadioButton.setEnabled(conn);
//            sixGRadioButton.setEnabled(conn);
//            sendDataButton.setEnabled(conn);
//            clearButton.setEnabled(conn);
//            calibrateButton.setEnabled(conn);
//        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jTabbedPaneTopTabPanel = new javax.swing.JTabbedPane();
        jPanelGraph = new javax.swing.JPanel();
        graphViewScrollPane = new javax.swing.JScrollPane();
        y_axisPanel = new javax.swing.JPanel();
        jPanelSplit = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jPanel4 = new javax.swing.JPanel();
        jPanelSplitViewYaxis = new javax.swing.JPanel();
        jLayeredPane1 = new javax.swing.JLayeredPane();
        jPanelPatternMatching = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jCheckBox1 = new javax.swing.JCheckBox();
        jCheckBox2 = new javax.swing.JCheckBox();
        jCheckBox3 = new javax.swing.JCheckBox();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jPanelTable = new javax.swing.JPanel();
        jScrollPaneTable = new javax.swing.JScrollPane();
        jToolBarDefaultToolbar = new javax.swing.JToolBar();
        jButtonStartLogging = new javax.swing.JButton();
        jButtonSaveSession = new javax.swing.JButton();
        jButtonDiscardSession = new javax.swing.JButton();
        jButtonRetrieve = new javax.swing.JButton();
        jLabelConnectionStatus = new javax.swing.JLabel();
        jLabelConnection = new javax.swing.JLabel();
        jRadioButton2G = new javax.swing.JRadioButton();
        jRadioButton6G = new javax.swing.JRadioButton();
        jLabel4 = new javax.swing.JLabel();
        jMenuBarTop = new javax.swing.JMenuBar();
        jMenuFile = new javax.swing.JMenu();
        jMenuItemNewRecord = new javax.swing.JMenuItem();
        jMenuItemOpenPatientRecord = new javax.swing.JMenuItem();
        jMenuItemNewTherapist = new javax.swing.JMenuItem();
        jMenuItemCloseRecord = new javax.swing.JMenuItem();
        jMenuItemExit = new javax.swing.JMenuItem();
        jMenuEdit = new javax.swing.JMenu();
        jMenuItemCopy = new javax.swing.JMenuItem();
        jMenuItemCut = new javax.swing.JMenuItem();
        jMenuItemPaste = new javax.swing.JMenuItem();
        jMenuData = new javax.swing.JMenu();
        jMenuItemSaveSession = new javax.swing.JMenuItem();
        jMenuItemViewSavedData = new javax.swing.JMenuItem();
        jMenuSensor = new javax.swing.JMenu();
        jMenuItemAddRemoveSensor = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jTabbedPaneTopTabPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Data Table"));
        jTabbedPaneTopTabPanel.addContainerListener(new java.awt.event.ContainerAdapter() {
            public void componentAdded(java.awt.event.ContainerEvent evt) {
                jTabbedPaneTopTabPanelComponentAdded(evt);
            }
            public void componentRemoved(java.awt.event.ContainerEvent evt) {
                jTabbedPaneTopTabPanelComponentRemoved(evt);
            }
        });

        jPanelGraph.setBorder(javax.swing.BorderFactory.createTitledBorder("Graph"));
        jPanelGraph.addContainerListener(new java.awt.event.ContainerAdapter() {
            public void componentAdded(java.awt.event.ContainerEvent evt) {
                jPanelGraphComponentAdded(evt);
            }
        });

        graphViewScrollPane.setBorder(null);
        graphViewScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
        graphViewScrollPane.setMaximumSize(new java.awt.Dimension(32767, 7725));
        graphViewScrollPane.setMinimumSize(new java.awt.Dimension(350, 125));
        graphViewScrollPane.setOpaque(false);
        graphViewScrollPane.setPreferredSize(new java.awt.Dimension(800, 525));
        graphViewScrollPane.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                graphViewScrollPaneMouseClicked(evt);
            }
        });

        y_axisPanel.setAlignmentX(1.0F);
        y_axisPanel.setAlignmentY(0.0F);
        y_axisPanel.setMaximumSize(new java.awt.Dimension(65, 3725));
        y_axisPanel.setMinimumSize(new java.awt.Dimension(65, 125));

        javax.swing.GroupLayout jPanelGraphLayout = new javax.swing.GroupLayout(jPanelGraph);
        jPanelGraph.setLayout(jPanelGraphLayout);
        jPanelGraphLayout.setHorizontalGroup(
            jPanelGraphLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelGraphLayout.createSequentialGroup()
                .addComponent(y_axisPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, 0)
                .addComponent(graphViewScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 1111, Short.MAX_VALUE))
        );
        jPanelGraphLayout.setVerticalGroup(
            jPanelGraphLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelGraphLayout.createSequentialGroup()
                .addGroup(jPanelGraphLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(y_axisPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(graphViewScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, 0))
        );

        jTabbedPaneTopTabPanel.addTab("Graph", jPanelGraph);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Data Table"));

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "x", "y", "z", "Time"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Double.class, java.lang.Double.class, java.lang.Double.class, java.lang.Long.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, true, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 294, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 352, Short.MAX_VALUE)
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Graph"));

        jLayeredPane1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLayeredPane1MouseClicked(evt);
            }
        });
        jLayeredPane1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                jLayeredPane1MouseDragged(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jPanelSplitViewYaxis, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, 0)
                .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 782, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanelSplitViewYaxis, javax.swing.GroupLayout.DEFAULT_SIZE, 352, Short.MAX_VALUE)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 352, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanelSplitLayout = new javax.swing.GroupLayout(jPanelSplit);
        jPanelSplit.setLayout(jPanelSplitLayout);
        jPanelSplitLayout.setHorizontalGroup(
            jPanelSplitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelSplitLayout.createSequentialGroup()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, 0)
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanelSplitLayout.setVerticalGroup(
            jPanelSplitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelSplitLayout.createSequentialGroup()
                .addGroup(jPanelSplitLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jTabbedPaneTopTabPanel.addTab("Split", jPanelSplit);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Pattern"));

        jCheckBox1.setText("Pattern1");
        jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox1ActionPerformed(evt);
            }
        });

        jCheckBox2.setText("Pattern2");

        jCheckBox3.setText("Pattern3");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jCheckBox1)
                    .addComponent(jCheckBox2)
                    .addComponent(jCheckBox3))
                .addContainerGap(25, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(jCheckBox1)
                .addGap(18, 18, 18)
                .addComponent(jCheckBox2)
                .addGap(18, 18, 18)
                .addComponent(jCheckBox3)
                .addContainerGap(228, Short.MAX_VALUE))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Percent Match"));

        jLabel1.setText("Pattern 1 % Match");

        jLabel2.setText("Pattern 2 % Match");

        jLabel3.setText("Pattern 3 % Match");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3))
                .addContainerGap(959, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(jLabel1)
                .addGap(28, 28, 28)
                .addComponent(jLabel2)
                .addGap(28, 28, 28)
                .addComponent(jLabel3)
                .addContainerGap(231, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanelPatternMatchingLayout = new javax.swing.GroupLayout(jPanelPatternMatching);
        jPanelPatternMatching.setLayout(jPanelPatternMatchingLayout);
        jPanelPatternMatchingLayout.setHorizontalGroup(
            jPanelPatternMatchingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelPatternMatchingLayout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanelPatternMatchingLayout.setVerticalGroup(
            jPanelPatternMatchingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelPatternMatchingLayout.createSequentialGroup()
                .addGroup(jPanelPatternMatchingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jTabbedPaneTopTabPanel.addTab("Pattern Matching", jPanelPatternMatching);

        jPanelTable.setBorder(javax.swing.BorderFactory.createTitledBorder("Data Table"));

        jScrollPaneTable.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
        jScrollPaneTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jScrollPaneTableMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanelTableLayout = new javax.swing.GroupLayout(jPanelTable);
        jPanelTable.setLayout(jPanelTableLayout);
        jPanelTableLayout.setHorizontalGroup(
            jPanelTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTableLayout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(jScrollPaneTable, javax.swing.GroupLayout.PREFERRED_SIZE, 700, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanelTableLayout.setVerticalGroup(
            jPanelTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPaneTable, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        jTabbedPaneTopTabPanel.addTab("Table", jPanelTable);

        jToolBarDefaultToolbar.setRollover(true);

        jButtonStartLogging.setText("Start Logging");
        jButtonStartLogging.setFocusable(false);
        jButtonStartLogging.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonStartLogging.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonStartLogging.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonStartLoggingActionPerformed(evt);
            }
        });
        jToolBarDefaultToolbar.add(jButtonStartLogging);

        jButtonSaveSession.setText("Save Session");
        jButtonSaveSession.setFocusable(false);
        jButtonSaveSession.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonSaveSession.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonSaveSession.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSaveSessionActionPerformed(evt);
            }
        });
        jToolBarDefaultToolbar.add(jButtonSaveSession);

        jButtonDiscardSession.setText("Discard Sesion");
        jButtonDiscardSession.setFocusable(false);
        jButtonDiscardSession.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonDiscardSession.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonDiscardSession.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonDiscardSessionActionPerformed(evt);
            }
        });
        jToolBarDefaultToolbar.add(jButtonDiscardSession);

        jButtonRetrieve.setText("Retrieve");
        jButtonRetrieve.setFocusable(false);
        jButtonRetrieve.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonRetrieve.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonRetrieve.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonRetrieveActionPerformed(evt);
            }
        });
        jToolBarDefaultToolbar.add(jButtonRetrieve);

        jLabelConnectionStatus.setText("Connection Status: ");

        jLabelConnection.setText("Connection");
        jLabelConnection.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jLabelConnectionPropertyChange(evt);
            }
        });

        buttonGroup1.add(jRadioButton2G);
        jRadioButton2G.setText("2G");
        jRadioButton2G.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton2GActionPerformed(evt);
            }
        });

        buttonGroup1.add(jRadioButton6G);
        jRadioButton6G.setText("6G");
        jRadioButton6G.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton6GActionPerformed(evt);
            }
        });

        jLabel4.setText("Scale:");

        jMenuFile.setText("File");

        jMenuItemNewRecord.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemNewRecord.setText("New Patient Record");
        jMenuItemNewRecord.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemNewRecordActionPerformed(evt);
            }
        });
        jMenuFile.add(jMenuItemNewRecord);

        jMenuItemOpenPatientRecord.setText("Open Patient Record");
        jMenuFile.add(jMenuItemOpenPatientRecord);

        jMenuItemNewTherapist.setText("New Therapist");
        jMenuFile.add(jMenuItemNewTherapist);

        jMenuItemCloseRecord.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemCloseRecord.setText("Close Record");
        jMenuItemCloseRecord.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemCloseRecordActionPerformed(evt);
            }
        });
        jMenuFile.add(jMenuItemCloseRecord);

        jMenuItemExit.setText("Exit");
        jMenuItemExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemExitActionPerformed(evt);
            }
        });
        jMenuFile.add(jMenuItemExit);

        jMenuBarTop.add(jMenuFile);

        jMenuEdit.setText("Edit");

        jMenuItemCopy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemCopy.setText("Copy");
        jMenuEdit.add(jMenuItemCopy);

        jMenuItemCut.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemCut.setText("Cut");
        jMenuEdit.add(jMenuItemCut);

        jMenuItemPaste.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemPaste.setText("Paste");
        jMenuEdit.add(jMenuItemPaste);

        jMenuBarTop.add(jMenuEdit);

        jMenuData.setText("Data");

        jMenuItemSaveSession.setText("Save Current Session");
        jMenuData.add(jMenuItemSaveSession);

        jMenuItemViewSavedData.setText("View Saved Data");
        jMenuItemViewSavedData.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemViewSavedDataActionPerformed(evt);
            }
        });
        jMenuData.add(jMenuItemViewSavedData);

        jMenuBarTop.add(jMenuData);

        jMenuSensor.setText("Sensor");

        jMenuItemAddRemoveSensor.setText("Add/Remove Sensor");
        jMenuItemAddRemoveSensor.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jMenuItemAddRemoveSensorMouseClicked(evt);
            }
        });
        jMenuItemAddRemoveSensor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAddRemoveSensorActionPerformed(evt);
            }
        });
        jMenuSensor.add(jMenuItemAddRemoveSensor);

        jMenuBarTop.add(jMenuSensor);

        setJMenuBar(jMenuBarTop);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jTabbedPaneTopTabPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1227, Short.MAX_VALUE)
                    .addComponent(jToolBarDefaultToolbar, javax.swing.GroupLayout.DEFAULT_SIZE, 1227, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabelConnectionStatus)
                        .addGap(18, 18, 18)
                        .addComponent(jLabelConnection)
                        .addGap(88, 88, 88)
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jRadioButton2G)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jRadioButton6G)))
                .addGap(0, 0, 0))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBarDefaultToolbar, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, 0)
                .addComponent(jTabbedPaneTopTabPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 445, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, 0)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelConnectionStatus)
                    .addComponent(jLabelConnection)
                    .addComponent(jLabel4)
                    .addComponent(jRadioButton2G)
                    .addComponent(jRadioButton6G))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItemCloseRecordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCloseRecordActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jMenuItemCloseRecordActionPerformed

    private void jMenuItemNewRecordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemNewRecordActionPerformed
        AddNewUserPop addUser = new AddNewUserPop();
        addUser.setTitle("Add New Patient");
        addUser.setVisible(true);
        addUser.setLocation(300, 150);
        addUser.setSize(540, 350);
        throw new UnsupportedOperationException("Not supported yet");
    }//GEN-LAST:event_jMenuItemNewRecordActionPerformed

    private void jButtonDiscardSessionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDiscardSessionActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jButtonDiscardSessionActionPerformed

    private void jButtonSaveSessionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveSessionActionPerformed
        ClassDB.readFile("C:\\Users\\krish\\Desktop\\data.txt");
        throw new UnsupportedOperationException("read file to database Exception");
    }//GEN-LAST:event_jButtonSaveSessionActionPerformed

    private void jMenuItemViewSavedDataActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemViewSavedDataActionPerformed
        ClassDB.retriveData();
        throw new UnsupportedOperationException("Not supported yet.");
    }//GEN-LAST:event_jMenuItemViewSavedDataActionPerformed

    private void jTabbedPaneTopTabPanelComponentAdded(java.awt.event.ContainerEvent evt) {//GEN-FIRST:event_jTabbedPaneTopTabPanelComponentAdded
        //jTabbedPaneGraphPanel.add(graphPanel);
        //jTabbedPaneGraphPanel.setVisible(true);
    }//GEN-LAST:event_jTabbedPaneTopTabPanelComponentAdded

    private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCheckBox1ActionPerformed

    private void jPanelGraphComponentAdded(java.awt.event.ContainerEvent evt) {//GEN-FIRST:event_jPanelGraphComponentAdded
//        panel graphPanel = new panel();
//        jPanelGraph.add(graphPanel);
    }//GEN-LAST:event_jPanelGraphComponentAdded

    private void jTabbedPaneTopTabPanelComponentRemoved(java.awt.event.ContainerEvent evt) {//GEN-FIRST:event_jTabbedPaneTopTabPanelComponentRemoved
        // TODO add your handling code here:
    }//GEN-LAST:event_jTabbedPaneTopTabPanelComponentRemoved

    private void jRadioButton2GActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2GActionPerformed
        accListener.doSetScale(2);
}//GEN-LAST:event_jRadioButton2GActionPerformed

    private void jRadioButton6GActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton6GActionPerformed
        accListener.doSetScale(6);
    }//GEN-LAST:event_jRadioButton6GActionPerformed

    private void jLabelConnectionPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jLabelConnectionPropertyChange
        if (jLabelConnection.getText().startsWith("connected") && !fixedData) {
            if (accListener.is2GScale()) {
                jRadioButton2G.setSelected(true);
            } else {
                jRadioButton6G.setSelected(true);
            }
        }

    }//GEN-LAST:event_jLabelConnectionPropertyChange

    private void jButtonStartLoggingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonStartLoggingActionPerformed
        sendData = !sendData;
        accListener.doSendData(sendData, graphView);
        jButtonStartLogging.setText(sendData ? "Stop Data" : "Start Logging");
        //   saveMenuItem.setEnabled(true);
        clearedData = false;
    }//GEN-LAST:event_jButtonStartLoggingActionPerformed

    private void jButtonRetrieveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRetrieveActionPerformed


        Vector Colname = new Vector();
        Vector list = new Vector();
        Colname.add(new String("x"));
        Colname.add(new String("y"));
        Colname.add(new String("z"));
        Colname.add(new String("g"));
        Colname.add(new String("Time"));
        rs = ClassDB.retriveData();
        try {
            int count = 0;
            while (rs.next()) {

                Double x = new Double(rs.getDouble("x"));
                Double y = new Double(rs.getDouble("y"));
                Double z = new Double(rs.getDouble("z"));
                Double g = new Double(rs.getDouble("g"));
                Integer indx = new Integer(rs.getInt("indx"));
                Vector result = new Vector();
                result.add(x);
                result.add(y);
                result.add(z);
                result.add(g);
                result.add(indx);
                list.add(result);
                graphView2.takeData(rs.getString("id"), rs.getLong("tMS"), rs.getInt("indx"), rs.getDouble("x"), rs.getDouble("y"), rs.getDouble("z"), rs.getDouble("g"), rs.getBoolean("twoG"));
                //System.out.println(Double.toString(rs.getDouble("x"))+Double.toString(rs.getDouble("y"))+Double.toString(rs.getDouble("z")));
                count++;

            //System.out.println(count+"cnt "+x+" "+y+" "+z);
            }
            jTable1.setModel(new DefaultTableModel(list, Colname) {

                Class[] types = new Class[]{
                    java.lang.Double.class, java.lang.Double.class, java.lang.Double.class, java.lang.Double.class, java.lang.Long.class
                };
                boolean[] canEdit = new boolean[]{
                    false, false, false, false, false
                };

                public Class getColumnClass(int columnIndex) {
                    return types[columnIndex];
                }

                public boolean isCellEditable(int rowIndex, int columnIndex) {
                    return canEdit[columnIndex];
                }
            });
            jScrollPane1.setViewportView(jTable1);
            jTable1.setVisible(true);

        } //        //Vector list = new Vector();
        //        //Vector result = new Vector();
        //        TableModel model = jTable1.getModel();
        //        try{
        //            int count=0;
        //            while(rs.next()){
        //
        //                 Double x = new Double(rs.getDouble("x"));
        //                 Double y = new Double(rs.getDouble("y"));
        //                 Double z = new Double(rs.getDouble("z"));
        //
        //                 System.out.println(x+" "+y+" "+z);
        //
        //                 model.setValueAt(x, count, 0);
        //                 model.setValueAt(y, count, 1);
        //                 model.setValueAt(z, count, 2);
        //                 //model.setValueAt(0, count, 3);
        //                 //model.
        //                 graphView2.takeData(count, rs.getDouble("x"), rs.getDouble("y"), rs.getDouble("z"));
        //
        //                 count++;
        //            }
        //        }
        catch (Exception e) {
            e.printStackTrace();
            System.out.println("printing to text field " + e.getMessage());
        } finally {
            ClassDB.closeConnection();
        }
}//GEN-LAST:event_jButtonRetrieveActionPerformed

    private void graphViewScrollPaneMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_graphViewScrollPaneMouseClicked
        System.out.println("X = " + Integer.toString(evt.getX()) + "Y = " + Integer.toString(evt.getY()));
}//GEN-LAST:event_graphViewScrollPaneMouseClicked

    private void jScrollPaneTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jScrollPaneTableMouseClicked

       // canvas.setCord(evt.getX(), evt.getY());

        System.out.println("X = " + Integer.toString(evt.getX()) + "Y = " + Integer.toString(evt.getY()));
    // TODO add your handling code here:
    }//GEN-LAST:event_jScrollPaneTableMouseClicked

    private void jLayeredPane1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLayeredPane1MouseClicked
        // When mouse is clicked, draw straight line
        System.out.println("X = " + Integer.toString(evt.getX()) + "Y = " + Integer.toString(evt.getY()));
    }//GEN-LAST:event_jLayeredPane1MouseClicked

    private void jMenuItemAddRemoveSensorMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenuItemAddRemoveSensorMouseClicked
    }//GEN-LAST:event_jMenuItemAddRemoveSensorMouseClicked

    private void jMenuItemAddRemoveSensorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAddRemoveSensorActionPerformed
        ListDndD.createAndShowGUI();
        //        AddRemoveSensor addRemoveSensor = new AddRemoveSensor();
//        addRemoveSensor.setVisible(true);
//        addRemoveSensor.setLocation(400, 150);
        //setDefaultCloseOperation();
    }//GEN-LAST:event_jMenuItemAddRemoveSensorActionPerformed

    private void jLayeredPane1MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLayeredPane1MouseDragged
        // TODO add your handling code here:
    }//GEN-LAST:event_jLayeredPane1MouseDragged

    private void jMenuItemExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemExitActionPerformed
        this.dispose();
    }//GEN-LAST:event_jMenuItemExitActionPerformed

    public void canvesPanelMousePressed( java.awt.event.MouseEvent evt) {
       canvas.setCord(evt.getX());
       //canvas.repaint();
       System.out.println("X = " + Integer.toString(evt.getX()) + "Y = " + Integer.toString(evt.getY()));
       
    }

    private void canvesPane1MouseReleased(java.awt.event.MouseEvent evt) {
       canvas.setCord2(evt.getX());
       canvas.repaint();
       System.out.println("X = " + Integer.toString(evt.getX()) + "Y = " + Integer.toString(evt.getY()));
       //canvas.setCord(0, 0, evt.getX());
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JScrollPane graphViewScrollPane;
    private javax.swing.JButton jButtonDiscardSession;
    private javax.swing.JButton jButtonRetrieve;
    private javax.swing.JButton jButtonSaveSession;
    private javax.swing.JButton jButtonStartLogging;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JCheckBox jCheckBox3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabelConnection;
    private javax.swing.JLabel jLabelConnectionStatus;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JMenuBar jMenuBarTop;
    private javax.swing.JMenu jMenuData;
    private javax.swing.JMenu jMenuEdit;
    private javax.swing.JMenu jMenuFile;
    private javax.swing.JMenuItem jMenuItemAddRemoveSensor;
    private javax.swing.JMenuItem jMenuItemCloseRecord;
    private javax.swing.JMenuItem jMenuItemCopy;
    private javax.swing.JMenuItem jMenuItemCut;
    private javax.swing.JMenuItem jMenuItemExit;
    private javax.swing.JMenuItem jMenuItemNewRecord;
    private javax.swing.JMenuItem jMenuItemNewTherapist;
    private javax.swing.JMenuItem jMenuItemOpenPatientRecord;
    private javax.swing.JMenuItem jMenuItemPaste;
    private javax.swing.JMenuItem jMenuItemSaveSession;
    private javax.swing.JMenuItem jMenuItemViewSavedData;
    private javax.swing.JMenu jMenuSensor;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    public javax.swing.JPanel jPanelGraph;
    private javax.swing.JPanel jPanelPatternMatching;
    private javax.swing.JPanel jPanelSplit;
    private javax.swing.JPanel jPanelSplitViewYaxis;
    private javax.swing.JPanel jPanelTable;
    private javax.swing.JRadioButton jRadioButton2G;
    private javax.swing.JRadioButton jRadioButton6G;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPaneTable;
    private javax.swing.JTabbedPane jTabbedPaneTopTabPanel;
    private javax.swing.JTable jTable1;
    private javax.swing.JToolBar jToolBarDefaultToolbar;
    private javax.swing.JPanel y_axisPanel;
    // End of variables declaration//GEN-END:variables
}
